package cn.tedu.boot031.mapper;

import cn.tedu.boot031.entity.Person;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface PersonMapper {
    @Insert("insert into person values(null,#{name},#{salary},#{department})")
    void insert(Person person);
    @Select("select id,name,salary,department from person")
    List<Person> select();
    @Delete("delete from person where id=#{id}")
    void deleteById(int id);
    @Update("update person set name=#{name},salary=#{salary},department=#{department} where id=#{id}")
    void update(Person person);

}
